import request from '@/utils/request'

// 获取日程列表
export function getScheduleList(params) {
    return request({
        url: '/api/schedule/list',
        method: 'get',
        params
    })
}

// 创建日程
export function createSchedule(data) {
    return request({
        url: '/api/schedule',
        method: 'post',
        data
    })
}

// 更新日程
export function updateSchedule(data) {
    return request({
        url: '/api/schedule',
        method: 'put',
        data
    })
}

// 删除日程
export function deleteSchedule(id) {
    return request({
        url: `/api/schedule/${id}`,
        method: 'delete'
    })
}

// 更新日程状态
export function updateScheduleStatus(id, status) {
    return request({
        url: `/api/schedule/${id}/status`,
        method: 'put',
        data: { status }
    })
}

// 获取日程详情
export function getScheduleDetail(id) {
    return request({
        url: `/api/schedule/${id}`,
        method: 'get'
    })
} 